return {
    'akinsho/toggleterm.nvim',
    version = '*',
    event = 'VeryLazy',
    opts = {
        open_mapping = [[<leader>;]],
        insert_mappings = false,
        -- 配置默认的 shell
        shell = function()
            if jit.os == 'Windows' then
                return 'pwsh.exe'
            end
            return vim.o.shell
        end
    },
    init = function()
        vim.api.nvim_create_autocmd({ 'TermOpen' }, {
            pattern = 'term://*',
            callback = function()
                local opts = { buffer = 0 }
                local km = vim.keymap
                km.set('t', '<esc>', [[<C-\><C-n>]], opts)
                km.set('t', '<C-w>', [[<C-\><C-n><C-w>]], opts)
            end
        })
    end
}
